import 'dart:convert';

import 'package:largefriends/entity/json/json_parse_utils.dart';

class LfMatchAgeEntity {
  LfMatchAgeEntity({
    this.max,
    this.min,
  });

  factory LfMatchAgeEntity.fromJson(Map<String, dynamic> jsonRes) =>
      LfMatchAgeEntity(
        max: jsonRes.asInt('max', 99),
        min: jsonRes.asInt('min', 40),
      );

  int? max;
  int? min;

  @override
  String toString() {
    return jsonEncode(this);
  }

  Map<String, dynamic> toJson() => <String, dynamic>{
        'max': max,
        'min': min,
      };
}
